//
//  Matrix.h
//

#pragma once

#include <iostream>
#include <stdlib.h>
#include <list>
#include <queue>
#include "Dijkstra.h"
#include "PathNode.h"
#include "Graph.h"

using namespace std;

class Matrix
{
    int *map;
    int n;
    int fo;
    int co;
    int fd;
    int cd;
    int k;
    Graph* graph;
    list<PathNode*>* path;
    
    void splitString(vector<string>* out, string str, string delimiter);
    void connectNodes();
    void getPath(Node* fromNode, Node* toNode);
public:
    Matrix();
    ~Matrix();
    void findPath();
    void loadFromInput(vector<string> inputLines);
    void printMap();
    void printPath(bool useTPOutputFormat);
    bool didFindPath();
    int checkPathOk();
    int getN();
    int getK();
    void createGraph();
};

